﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;

namespace WebApplication
{
    public partial class TinTucs : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Display();
            }
        }
        private void Display()
        {
            string Id = Request.QueryString["IDTinTuc"];
            Entities.TinTuc data = TinTuc_BLL.LayID(Id);
            if (data != null)
            {
                lblTieuDe.Text = data.TieuDe;
                lblNoiDung.Text = HttpUtility.HtmlEncode(data.NoiDung);
                imgHinhAnh.ImageUrl = LinkBLL.ToTinTucImages(data.HinhAnh);
                lblNgayDang.Text = data.NgayDang.ToString("dd/MM/yyyy");
            }
        }

    }
}